home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Sunday Times: The Month 2003 December
/
The Sunday Times - The Month 2003-12.iso
/
mac
/
The Month DEC 03
/
engine
/
modules
/
thumbs_kids.swf
/
scripts
/
frame_1
/
DoAction.as
Wrap
Text File
|
2003-09-19
|
3KB
|
116 lines
function loadImage(mc, node, extrapath)
{
var _loc3_ = extrapath;
_loc3_ != null ? 0 : (_loc3_ = "");
var strDefaultPath = Tardis.ASSETS_FOLDER + "images/" + Tardis.ActiveSection.id + "/";
var _loc1_ = node.getText();
var _loc2_ = node.attributes.path;
if(_loc2_ != null)
{
_loc1_ = _loc2_ + _loc1_;
}
else
{
_loc1_ = strDefaultPath + _loc3_ + _loc1_;
}
strPathPrefix != null ? 0 : (strPathPrefix = "");
mc.loadMovie(strPathPrefix + _loc1_);
}
function addLink(mc)
{
Links[mc.link] = mc;
}
function getMCfromLink(Item)
{
var _loc1_ = Item;
if(Links[_loc1_] == null)
{
var _loc2_ = [];
while(_loc1_ != sideMenu.ItemHome)
{
_loc2_.unshift(_loc1_._name.split("_").pop());
_loc1_ = _loc1_._parent._parent;
}
var _loc3_ = _loc2_.join("/");
Links[_loc1_] = Links[_loc3_];
}
return Links[_loc1_];
}
function removeLinkListener()
{
Tardis.sideMenu.EB.removeListener(this);
}
function txtOver(mc)
{
var _loc1_ = mc;
_loc1_.gotoAndStop("over");
if(blnHasPreview)
{
_parent.preview.doOver(_loc1_.num);
}
Tardis.sideMenu.doOver(_loc1_.link);
}
function txtOut(mc)
{
var _loc1_ = mc;
_loc1_.gotoAndStop("off");
if(blnHasPreview)
{
_parent.preview.doOut(_loc1_.num);
}
Tardis.sideMenu.doOut(_loc1_.link);
}
function txtUp(mc)
{
Tardis.sideMenu.doUp(mc.link);
}
function init()
{
nodeData = _parent.ndItems.childNodes[this._name.split("_")[2]];
var strType = nodeData.attributes.type;
var _loc3_ = strType + "clip" + nodeData.childNodes.length + "MC";
attachMovie(_loc3_,"mc_module",++depth,{strType:strType});
mc_module._x = 0;
mc_module._y = 37;
var _loc2_ = Tardis.ActiveSection.id;
var _loc1_ = Tardis.Colors;
var strColor = _loc1_.getString(_loc2_);
SECTION_COLOR = _loc1_.getHex(_loc2_);
DEFAULT_COLOR = _loc1_.getHex("default");
titleFF.htmlText = nodeData.attributes.title;
titleFF.textColor = SECTION_COLOR;
THUMB_PATH = nodeData.attributes.thumbpath;
play();
onComplete();
}
function doOver(Item)
{
var _loc1_ = getMCfromLink(Item);
_loc1_.gotoAndStop("over");
_parent.preview.doOver(_loc1_.num);
}
function doOut(Item)
{
var _loc1_ = getMCfromLink(Item);
_loc1_.gotoAndStop("off");
_parent.preview.doOut(_loc1_.num);
}
function positionElements(mc)
{
var _loc1_ = mc;
_loc1_.activeBtn._height = _loc1_.imgToCheck._height + _loc1_.titleFF._height + 5;
_loc1_.titleFF._y = _loc1_.imgToCheck._height;
_loc1_._visible = true;
}
Links = {};
Tardis.sideMenu.EB.addListener(this);
blnHasPreview = 1;
stop();
onReady();
init();
this.onUnload = function()
{
removeLinkListener();
this.onUnload = null;
};